<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" value="全选">
<input type="button" value="反选">
<input type="button" value="取消">
<table border="3" >
    <thead>
        <tr>
            <th>#</th>
            <th>姓名</th>
            <th>爱好</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><input type="checkbox"></td>
            <td>金老板</td>
            <td>开车</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>景女神</td>
            <td>茶道</td>
        </tr>
        <tr>
            <td><input type="checkbox"></td>
            <td>宛昊（宛局）</td>
            <td>不洗头、不翻车、不要脸</td>
        </tr>
    </tbody>
</table>

<script src="jquery.js"></script>
<script>
    $("[value='全选']").click(function(){
        $("[type='checkbox']").prop('checked',true);
    })
    $("[value='取消']").click(function(){
        $("[type='checkbox']").prop('checked',false);
    })
    $("[value='反选']").click(function(){
        for (var i in $("[type='checkbox']")){
            if ($($("[type='checkbox']")[i]).prop('checked')){
                $($("[type='checkbox']")[i]).prop('checked',false);
            }else {
                $($("[type='checkbox']")[i]).prop('checked',true);
            }
        }
    })
</script>
</body>
</html>